{include file="head" /}

{include file="menu" /}


<!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!--state overview start-->
              
              <div class="row state-overview">
                <div class="container">
                <div class="row">
                      <form action="" method="get">
                      <div class="col-lg-3 mar-10">
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon1">用户名称</span>
                            <input type="text" value="{$getdata.username?$getdata.username:''}"  class="form-control" name="username" />
                        </div>
                      </div>

                     <div class="col-lg-6 mar-10">
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon1">提交时间</span>
                            <input type="text"  id="datetimepicker" class="form-control" placeholder="点击选择时间" name="starttime" value="{$getdata.starttime?$getdata.starttime:''}"/>
                            <span class="input-group-addon" id="basic-addon1">至</span>
                            <input type="text"  id="datetimepicker_end" class="form-control" placeholder="点击选择时间" name="endtime" value="{$getdata.endtime?$getdata.endtime:''}" />
                        </div>
                      </div>

                      <div class="col-lg-3 mar-10">
                        <div class="input-group">
                            <span class="input-group-addon">类型</span>
                            <select name="is_check" id="" class="selectpicker show-tick form-control">
                                <option value="">全部</option>
                                <option value="0">未审核</option>
                                <option value="1">已审核通过</option>
                                <option value="2">未审核通过</option>
                            </select>
                        </div>
                      </div>

                    <div class="col-lg-1 mar-10">
                        <input type="submit" class="btn btn-success" value="搜索">
                      </div>
					</form>
                </div>
                
              </div>
              </div>
              <!--state overview end-->
            <br><br>
            <a href="{:url('user/userinfo')}"><button type="submit" class="btn btn-danger">全部</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="{:url('user/userinfo',array('is_check'=>0))}"><button type="submit" class="btn btn-danger">未审核（2）</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="{:url('user/userinfo',array('is_check'=>1))}"><button type="submit" class="btn btn-danger">已审核通过</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="{:url('user/userinfo',array('is_check'=>2))}"><button type="submit" class="btn btn-danger">未审核通过</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="javascript:;"><button type="submit" class="btn btn-danger">导出</button></a>
            <br><br>
             <div class="row">
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              用户列表
                          </header>
                          <table class="table table-striped table-advance table-hover">
                            <thead class="ordertable">
                              <tr>
                                <th>编号</th>
                                <th>交易账号</th>
                                <th>真实姓名</th>
                                <th>微信头像</th>
                                <th>身份证号</th>
                                <th>身份证正面照</th>
                                <th>微信号</th>
                                <th>手机号码</th>
                                <th>提交时间</th>
                                <th>操作</th>
                            </tr>
                          </thead>
                          <tbody>
                          <!-- {volist name="cardinfo" id="vo"} -->
                              <tr>
                                  <td>{$vo.cid}</td>
                                  <td>{$vo.username}</td>
                                  <td>{$vo.cardname} </td>
                                  <td><img class="userpic" alt="" src="{$vo.portrait}"></td>
                                  <td>{$vo.cardnum}</td>
                                  <td><img style="height:100px" alt="" src="{$vo.cardpic?$vo.cardpic:$vo.portrait}"></td>
                                  <td>{$vo.wxnumber}</td>
                                  <td>{$vo.utel} </td>
                                  <td>{$vo.ctime|date="Y-m-d H:i:s",###}</td>
                                  <td>
                                      {if $vo.is_check == 0}
                                      <button class="btn btn-primary btn-xs" onclick="return checkcard('{$vo.cid}',1)">通过</button>
                                      <button class="btn btn-danger btn-xs" onclick="return checkcard('{$vo.cid}',2)">不通过</button>
                                      {elseif $vo.is_check == 1/}
                                      <span class="color_green">审核通过</span>
                                      {elseif $vo.is_check == 2/}
                                      <span class="color_red">未审核通过</span>
                                      {/if}
                                  </td>
                              </tr>
                              <!-- {/volist} -->
                              

                              

                              
                              
                              
                              </tbody>
                          </table>
                      </section>
                  </div>
              </div>
              
             {$cardinfo->render()}

          </section>
      </section>
      <!--main content end-->
  </section>


{include file="foot" /}
<script>

function checkcard(cid,type) {
	if(!cid || !type){
		layer.msg('参数错误'); 
    	return false;
	}

	if(type == 1){
		var con = '确定审核通过吗？';
	}else{
		var con = '确定审核不通过吗？';
	}

	layer.open({
	  content: con,
	  yes: function(index){
	    //do something
	    var formurl = "{:Url('user/userinfo')}";
		var data = 'cid='+cid+'&is_check='+type;
	    var locurl = "{:Url('user/userinfo')}";

	    WPpost(formurl,data,locurl);
	  }
	});

	


}


//时间选择器
$('#datetimepicker').datetimepicker();
$('#datetimepicker_end').datetimepicker();

</script>